<?php
/**
 * Обработчик для типа документа картинки
 *
 * @package eventsfetcher
 * @author Alexander Sibiryakov
 **/
class ImageEventHandler extends DocumentEventHandler 
{	
	private $oid;
	private $author_openid;
	private $date;
	private $url;
	private $title;
	private $descr;
	private $tags;
	private $created_dt;
	private $edited_dt;

	protected function mapData($data) {
		$hash = unserialize($data['data']);
		$this->title = $hash['title'];
		$this->descr = $hash['description'];
	}
	
	protected function createCustomElements($dom) {
		$chlds = array();
		$chlds[] = $dom->createElement("title", $this->esc($this->title));
		$chlds[] = $dom->createElement("summary", $this->esc($this->descr));
		$chlds[] = $dom->createElement("is_comment", 0);
		return $chlds;
	}
} // END class 